let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

let r = arr.map(e => {
    return e * e;
});

r.forEach(e => console.log(e))